-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Add base44 logs command
#193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.28-pr.193.5a0ab06Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.28-pr.193.5a0ab06"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.28-pr.193.5a0ab06"
}
}
Preview published to npm registry — try new features instantly! |
Code reviewFound 1 issue to address: CLAUDE.md Documentation MissingThe PR adds a new CLAUDE.md Rule (line 659):
What needs updating:
This documentation helps AI agents understand the logs architecture when working on related features. |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. The PR correctly implements the |
- Shorten timestamp to readable format (YYYY-MM-DD HH:MM:SS) - Adjust column widths for better alignment - Dim the timestamp for visual hierarchy Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
| ); | ||
|
|
||
| // Filter by level if specified (API doesn't support level filtering) | ||
| const filteredLogs = filters.level |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pass this to the API
| } | ||
|
|
||
| // Sort by time (respecting order option) | ||
| const order = options.order?.toUpperCase() === "ASC" ? 1 : -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLI should be stupid as possible, if we can get this form BE its best
Note
Description
Adds a unified
base44 logscommand that fetches and displays both app audit logs (workspace events like entity changes, deployments, user actions) and function runtime logs (console output from Deno Deploy) in a single time-sorted view. Supports filtering by function name, log level, time range, with pagination and JSON output for scripting.Related Issue
None
Type of Change
Changes Made
src/core/logs/module withfetchAuditLogs()API and Zod schemas for workspace audit eventssrc/core/resources/function/withfetchFunctionLogs()to retrieve runtime console logs via Deno Deploy proxybase44 logsCLI command with filtering options:--function,--level,--since,--until,-n/--limit,--order,--json--functionnot specifiedmockAppInfo,mockAuditLogs,mockFunctionLogsAPI mocksTesting
npm test)Checklist
Additional Notes
Tests are currently pending in CI. The implementation follows existing patterns for commands (factory functions with CLIContext), API clients (authenticated base44Client), and resource modules. Level filtering uses semantic mapping:
infomaps to successful audit events,errorto failures, whiledebug/warnskip audit logs entirely and only show function logs at those levels.🤖 Generated by Claude | 2026-02-08 20:15 UTC